<div>
    <a class="layui-btn model-a" href="{:url('rbac/addPermission')}?id=0">添加权限</a>
</div>

<table class="layui-table edit-table" lay-data="{cellMinWidth: 80,
    url:'{:url('getPermission')}'
    }" lay-filter="edit-table" data-url="{:url('editPermissions')}" data-key="permission_id">
    <thead>
    <tr>
        <th lay-data="{field:'permission_id', width:80, sort: true}">ID</th>
        <th lay-data="{field:'pid', sort: true, edit:'number',width:80}">pid</th>
        <th lay-data="{field:'rule', edit:'text'}">规则</th>
        <th lay-data="{field:'permission_name', edit:'text'}">标题</th>
        <th lay-data="{templet:'#icon'}">图标</th>
        <th lay-data="{field:'icon',  edit:'text'}">图标代码</th>
        <th lay-data="{field:'type',  edit:'text'}">类型</th>
        <th lay-data="{field:'order_number', edit:'number', sort: true}">排序</th>
        <th lay-data="{field:'status',  edit:'number'}">状态</th>
        <th lay-data="{toolbar: '#manipulate', minWidth:200, fixed: 'right'}">操作</th>
    </tr>
    </thead>
</table>

<script type="text/html" id="manipulate">
    <a class="layui-btn layui-btn-mini model-a layui-btn-sm" href="{:url('rbac/addPermission')}?id={{ d.permission_id }}">添加权限</a>
</script>
<script type="text/html" id="icon">
    <i class="layui-icon">{{ d.ricon }}</i>
</script>

